package cn.bobohost.crmrbac.dao.mapper;

import cn.bobohost.crmrbac.pojo.po.Customer;
import cn.bobohost.crmrbac.pojo.query.CustomerQuery;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 波波老师
 * @since 2025-05-21
 */
public interface CustomerMapper extends BaseMapper<Customer> {


    List<Customer> selectPotentialCustomerByCondition(CustomerQuery customerQuery);

    @MapKey("groupType")
    List<Map<String, Object>> countCustomerMakeByEmp(@Param("keyword") String keyword, @Param("dateBegin") String dateBegin, @Param("dateEnd") String dateEnd);

    @MapKey("groupType")
    List<Map<String, Object>> countCustomerMakeByYear(@Param("keyword") String keyword,@Param("dateBegin") String dateBegin,@Param("dateEnd") String dateEnd);

    @MapKey("groupType")
    List<Map<String, Object>> countCustomerMakeByMonth(@Param("keyword") String keyword,@Param("dateBegin") String dateBegin,@Param("dateEnd") String dateEnd);

    @MapKey("groupType")
    List<Map<String, Object>> countCustomerMakeByDay(@Param("keyword") String keyword,@Param("dateBegin") String dateBegin,@Param("dateEnd") String dateEnd);


}
